//
//  LXHomeViewCell.m
//  LXLessDemo
//
//  Created by LX on 16/2/15.
//  Copyright © 2016年 LX. All rights reserved.
//

#import "LXHomeViewCell.h"
@implementation LXHomeViewCell

- (void)awakeFromNib {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    LXDanmuView *dView= [[LXDanmuView alloc] initDanMuViewWithTypeImage:nil textBgImage:[UIImage imageNamed:@"right"] textString:@"国宝在线" isShow:YES];
    dView.frame = CGRectMake(72, 131, CGRectGetWidth(dView.bounds), CGRectGetHeight(dView.bounds));
    [self.contentView addSubview:dView];
    // Configure the view for the selected state
}
-(void)settingMainImageView:(UIImage *)imageView titleLab:(NSString *)titleLab user:(UIImage *)user nameLab:(NSString *)nameLab date:(NSString *)date{
    [self.mainImageView setImage:imageView];
    self.titleLab.text = titleLab;
    [self.user setImage:user];
    self.nameLab.text = nameLab;
    self.dateLab.text = date;
    for (UIView *vir in self.contentView.subviews) {
        if ([vir isKindOfClass:[LXDanmuView class]]) {
            [vir removeFromSuperview];
        }
    }
    LXDanmuView *dView= [[LXDanmuView alloc] initDanMuViewWithTypeImage:nil textBgImage:[UIImage imageNamed:@"pad"] textString:@"眯眯眯眯眯眯" isShow:YES];
    dView.frame = CGRectMake(110, 174, CGRectGetWidth(dView.bounds), CGRectGetHeight(dView.bounds));
    dView.tag = 5122;
    [self.contentView addSubview:dView];

}
//-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//    LXDanmuView *dView = [self viewWithTag:5122];
//    dView.animationLabel.hidden = !dView.animationLabel.hidden;
//}

@end
